import { InjectionKey } from "vue";
import { Store, createStore } from "vuex";
import todos from "./modules/todos";

export const key: InjectionKey<Store<StateInter>> = Symbol();

const store = createStore({
  state: {
    count: 1,
  },
  mutations: {
    add(state) {
      state.count++;
    },
  },
  modules: {
    todos,
  },
});

export default store;
